<template>
  <div>
    <!-- 头部 -->
    <div>
      <slot :xxx="user" name="header"></slot>
    </div>
    <!-- 内容 -->
    <div>
      <slot name="content" :msg="user"></slot>
    </div>

    <!-- 匿名插槽 -->
    <div>
      <slot></slot>
    </div>

    <!-- 具名插槽 -->
    <div>
      <slot name="xxx"></slot>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      user: {
        name: "deng",
        age: 12
      }
    };
  }
};
</script>

<style lang="scss" scoped>
</style>
